package com.iyanbao.webapi;


public class WebResponse {

	public boolean hasError = false;
	public String errMsg = "";
	public String res;
	public int errorCode;
	public Object result;

	//public JSONObject jasonResult;
	public boolean hasError() {
		return hasError;
	}

	public void setErrMsg(String msg) {
		hasError = true;
		errMsg = msg;
	}

	public WebResponse(String res) {
		this.res = res;
	}

	public WebResponse(int errorCode) {
		hasError = true;
		errMsg = "err code:" + errorCode;
		this.errorCode = errorCode;
	}

	public WebResponse(int errorCode, String errorMsg) {
		hasError = true;
		errMsg = errorMsg;
		this.errorCode = errorCode;
	}

	public WebResponse(Object o) {
		this.result = o;
	}
//	public WebResponse(JSONObject jasonResult) {
//		this.jasonResult = jasonResult;
//	}
}
